// 异步获取UniStorage里的内容
export async function getStorage<T>(key: string): Promise<UniNamespace.GetStorageSuccess<T>> {
    return new Promise((resolve, reject) => {
        uni.getStorage<T>({
            key,
            success: (res) => {
                resolve(res as UniNamespace.GetStorageSuccess<T>)
            },
            fail: (err) => {
                reject(err)
            }
        })
    })
}
